<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use DB;
class Admin extends Model
{
	//指定对应的数据库
    // protected $connection = 'room';

	//指定对应的表
    protected $table = 'admin';

    //指定可以填充的字段

    protected $fillable = [
        'name', 'password','mobile','email','created_at','updated_at','timestamps',
    ];


   //表明模型是否应该被打上时间戳
    public $timestamps = true;


	public function login($name){
		// return 1111;die;
    	return  DB::table('admin')->where('name',$name)->first();
	}
}
